﻿package plugin.stallage.handler
{
    import cmd.*;
    import com.core.*;
    import com.sh.game.util.*;
    import pluginfw.nio.imsg.*;

    public class StallageHandler extends Object implements IGroupHandler
    {

        public function StallageHandler()
        {
            return;
        }// end function

        public function dealSimpleMessage(param1:ISimpleMessage) : void
        {
            switch(param1.getCmd())
            {
                case CMDStallage.Init:
                {
                    ModelProxy.change("stallage", "init", param1.getParam());
                    break;
                }
                case CMDStallage.AddItem:
                {
                    ModelProxy.change("stallage", "additem", param1.getParam());
                    break;
                }
                case CMDStallage.FallItem:
                {
                    ModelProxy.change("stallage", "fallitem", param1.getParam());
                    break;
                }
                case CMDStallage.ChangeItem:
                {
                    ModelProxy.change("stallage", "changeitem", param1.getParam());
                    break;
                }
                case CMDStallage.Stallage:
                {
                    ModelProxy.change("stallage", "stallage", param1.getParam());
                    break;
                }
                case CMDStallage.ShutShop:
                {
                    ModelProxy.change("stallage", "shutshop", param1.getParam());
                    break;
                }
                case CMDStallage.lookStallage:
                {
                    ModelProxy.change("plugin", "open", {target:"stallage", point:UIGlobel.pointsDic["stallage"], data:param1.getParam()});
                    break;
                }
                case CMDStallage.UpdateStallage:
                {
                    ModelProxy.change("stallage", "updatestallage", param1.getParam());
                    break;
                }
                case CMDStallage.Error:
                {
                    ModelProxy.change("movetips", "error", param1.getParam());
                    break;
                }
                case CMDStallage.rizhi:
                {
                    ModelProxy.change("stallage", "rizhi", param1.getParam());
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

        public function dealBufferMessage(param1:IBufferMessage) : void
        {
            return;
        }// end function

        public function dealProxyMessage(param1:IProxyMessage) : void
        {
            return;
        }// end function

    }
}
